<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>PxHitBuffer&lt; HitType &gt; Struct Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="PhysXLogoBlack.png"/></td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('structPxHitBuffer.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="structPxHitBuffer-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">PxHitBuffer&lt; HitType &gt; Struct Template Reference<div class="ingroups"><a class="el" href="group__scenequery.html">Scenequery</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Returns scene query hits (intersections) to the user in a preallocated buffer.  
 <a href="structPxHitBuffer.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="PxQueryReport_8h_source.html">PxQueryReport.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for PxHitBuffer&lt; HitType &gt;:</div>
<div class="dyncontent">
<div class="center"><img src="structPxHitBuffer__inherit__graph.png" border="0" usemap="#PxHitBuffer_3_01HitType_01_4_inherit__map" alt="Inheritance graph"/></div>
<map name="PxHitBuffer_3_01HitType_01_4_inherit__map" id="PxHitBuffer_3_01HitType_01_4_inherit__map">
<area shape="rect" id="node2" href="structPxHitCallback.html" title="This callback class facilitates reporting scene query hits (intersections) to the user..." alt="" coords="5,5,177,32"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for PxHitBuffer&lt; HitType &gt;:</div>
<div class="dyncontent">
<div class="center"><img src="structPxHitBuffer__coll__graph.png" border="0" usemap="#PxHitBuffer_3_01HitType_01_4_coll__map" alt="Collaboration graph"/></div>
<map name="PxHitBuffer_3_01HitType_01_4_coll__map" id="PxHitBuffer_3_01HitType_01_4_coll__map">
<area shape="rect" id="node2" href="structPxHitCallback.html" title="This callback class facilitates reporting scene query hits (intersections) to the user..." alt="" coords="5,109,177,136"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a89bcec685c76c5cdc0662eb52b67d699"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structPxHitBuffer.html#a89bcec685c76c5cdc0662eb52b67d699">PxHitBuffer</a> (HitType *aTouches=NULL, <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> aMaxNbTouches=0)</td></tr>
<tr class="memdesc:a89bcec685c76c5cdc0662eb52b67d699"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the buffer with user memory.  <a href="#a89bcec685c76c5cdc0662eb52b67d699">More...</a><br /></td></tr>
<tr class="separator:a89bcec685c76c5cdc0662eb52b67d699"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9ac7ea1c4411b8b88fa3099cb0df6cd1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__foundation.html#gacb03347b642a2a5bdea1f9b305a6fbec">PX_INLINE</a> <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structPxHitBuffer.html#a9ac7ea1c4411b8b88fa3099cb0df6cd1">getNbAnyHits</a> () const</td></tr>
<tr class="memdesc:a9ac7ea1c4411b8b88fa3099cb0df6cd1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the number of any hits in this result, blocking or touching.  <a href="#a9ac7ea1c4411b8b88fa3099cb0df6cd1">More...</a><br /></td></tr>
<tr class="separator:a9ac7ea1c4411b8b88fa3099cb0df6cd1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaab5f604de4a34ec0a9e3d6a86048833"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__foundation.html#gacb03347b642a2a5bdea1f9b305a6fbec">PX_INLINE</a> const HitType &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structPxHitBuffer.html#aaab5f604de4a34ec0a9e3d6a86048833">getAnyHit</a> (const <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> index) const</td></tr>
<tr class="memdesc:aaab5f604de4a34ec0a9e3d6a86048833"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convenience iterator used to access any hits in this result, blocking or touching.  <a href="#aaab5f604de4a34ec0a9e3d6a86048833">More...</a><br /></td></tr>
<tr class="separator:aaab5f604de4a34ec0a9e3d6a86048833"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac0d41dcf23ee0354d872d9d1348da971"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__foundation.html#gacb03347b642a2a5bdea1f9b305a6fbec">PX_INLINE</a> <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structPxHitBuffer.html#ac0d41dcf23ee0354d872d9d1348da971">getNbTouches</a> () const</td></tr>
<tr class="separator:ac0d41dcf23ee0354d872d9d1348da971"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b764a84b8585b2a75ee37f210a2913b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__foundation.html#gacb03347b642a2a5bdea1f9b305a6fbec">PX_INLINE</a> const HitType *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structPxHitBuffer.html#a9b764a84b8585b2a75ee37f210a2913b">getTouches</a> () const</td></tr>
<tr class="separator:a9b764a84b8585b2a75ee37f210a2913b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1211b1a3c0bffae96842211901484d2d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__foundation.html#gacb03347b642a2a5bdea1f9b305a6fbec">PX_INLINE</a> const HitType &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structPxHitBuffer.html#a1211b1a3c0bffae96842211901484d2d">getTouch</a> (const <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> index) const</td></tr>
<tr class="separator:a1211b1a3c0bffae96842211901484d2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad55cb7268df4d1c2a09d5daafb060daa"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__foundation.html#gacb03347b642a2a5bdea1f9b305a6fbec">PX_INLINE</a> <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structPxHitBuffer.html#ad55cb7268df4d1c2a09d5daafb060daa">getMaxNbTouches</a> () const</td></tr>
<tr class="separator:ad55cb7268df4d1c2a09d5daafb060daa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af3810ae6d94b93028e7a7d813f820cb4"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structPxHitBuffer.html#af3810ae6d94b93028e7a7d813f820cb4">~PxHitBuffer</a> ()</td></tr>
<tr class="separator:af3810ae6d94b93028e7a7d813f820cb4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_structPxHitCallback"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_structPxHitCallback')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="structPxHitCallback.html">PxHitCallback&lt; HitType &gt;</a></td></tr>
<tr class="memitem:a062cff2cdd2dfe1f63d0549758ea2627 inherit pub_methods_structPxHitCallback"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structPxHitCallback.html#a062cff2cdd2dfe1f63d0549758ea2627">PxHitCallback</a> (HitType *aTouches, <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> aMaxNbTouches)</td></tr>
<tr class="memdesc:a062cff2cdd2dfe1f63d0549758ea2627 inherit pub_methods_structPxHitCallback"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the class with user provided buffer.  <a href="structPxHitCallback.html#a062cff2cdd2dfe1f63d0549758ea2627">More...</a><br /></td></tr>
<tr class="separator:a062cff2cdd2dfe1f63d0549758ea2627 inherit pub_methods_structPxHitCallback"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a86b66684b448ec43083edf3aa1983234 inherit pub_methods_structPxHitCallback"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structPxHitCallback.html#a86b66684b448ec43083edf3aa1983234">finalizeQuery</a> ()</td></tr>
<tr class="memdesc:a86b66684b448ec43083edf3aa1983234 inherit pub_methods_structPxHitCallback"><td class="mdescLeft">&#160;</td><td class="mdescRight">Query finalization callback, called after the last processTouches callback.  <a href="structPxHitCallback.html#a86b66684b448ec43083edf3aa1983234">More...</a><br /></td></tr>
<tr class="separator:a86b66684b448ec43083edf3aa1983234 inherit pub_methods_structPxHitCallback"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7fbb5959c9fcc98834745644422210c3 inherit pub_methods_structPxHitCallback"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structPxHitCallback.html#a7fbb5959c9fcc98834745644422210c3">~PxHitCallback</a> ()</td></tr>
<tr class="separator:a7fbb5959c9fcc98834745644422210c3 inherit pub_methods_structPxHitCallback"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8ff687b42ac0273e730c714bf66dae49 inherit pub_methods_structPxHitCallback"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__foundation.html#ga6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structPxHitCallback.html#a8ff687b42ac0273e730c714bf66dae49">hasAnyHits</a> ()</td></tr>
<tr class="memdesc:a8ff687b42ac0273e730c714bf66dae49 inherit pub_methods_structPxHitCallback"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if any blocking or touching hits were encountered during a query.  <a href="structPxHitCallback.html#a8ff687b42ac0273e730c714bf66dae49">More...</a><br /></td></tr>
<tr class="separator:a8ff687b42ac0273e730c714bf66dae49 inherit pub_methods_structPxHitCallback"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:af60ac2d3405c5af467f767f812f3f01d"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="group__scenequery.html#ga4d0184965c0a910f5c96cb69c0690f5c">PxAgain</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structPxHitBuffer.html#af60ac2d3405c5af467f767f812f3f01d">processTouches</a> (const HitType *buffer, <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> nbHits)</td></tr>
<tr class="memdesc:af60ac2d3405c5af467f767f812f3f01d"><td class="mdescLeft">&#160;</td><td class="mdescRight">virtual callback function used to communicate query results to the user.  <a href="#af60ac2d3405c5af467f767f812f3f01d">More...</a><br /></td></tr>
<tr class="separator:af60ac2d3405c5af467f767f812f3f01d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_attribs_structPxHitCallback"><td colspan="2" onclick="javascript:toggleInherit('pub_attribs_structPxHitCallback')"><img src="closed.png" alt="-"/>&#160;Public Attributes inherited from <a class="el" href="structPxHitCallback.html">PxHitCallback&lt; HitType &gt;</a></td></tr>
<tr class="memitem:a63b2851eaf99b190fc468e00e8d1e55d inherit pub_attribs_structPxHitCallback"><td class="memItemLeft" align="right" valign="top">HitType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structPxHitCallback.html#a63b2851eaf99b190fc468e00e8d1e55d">block</a></td></tr>
<tr class="memdesc:a63b2851eaf99b190fc468e00e8d1e55d inherit pub_attribs_structPxHitCallback"><td class="mdescLeft">&#160;</td><td class="mdescRight">Holds the closest blocking hit result for the query. Invalid if hasBlock is false.  <a href="structPxHitCallback.html#a63b2851eaf99b190fc468e00e8d1e55d">More...</a><br /></td></tr>
<tr class="separator:a63b2851eaf99b190fc468e00e8d1e55d inherit pub_attribs_structPxHitCallback"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac20c6d1c2dd520d771da9b63f7f4f363 inherit pub_attribs_structPxHitCallback"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structPxHitCallback.html#ac20c6d1c2dd520d771da9b63f7f4f363">hasBlock</a></td></tr>
<tr class="memdesc:ac20c6d1c2dd520d771da9b63f7f4f363 inherit pub_attribs_structPxHitCallback"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set to true if there was a blocking hit during query.  <a href="structPxHitCallback.html#ac20c6d1c2dd520d771da9b63f7f4f363">More...</a><br /></td></tr>
<tr class="separator:ac20c6d1c2dd520d771da9b63f7f4f363 inherit pub_attribs_structPxHitCallback"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa3fa478af9db3e043a540fca72a2f468 inherit pub_attribs_structPxHitCallback"><td class="memItemLeft" align="right" valign="top">HitType *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structPxHitCallback.html#aa3fa478af9db3e043a540fca72a2f468">touches</a></td></tr>
<tr class="memdesc:aa3fa478af9db3e043a540fca72a2f468 inherit pub_attribs_structPxHitCallback"><td class="mdescLeft">&#160;</td><td class="mdescRight">User specified buffer for touching hits.  <a href="structPxHitCallback.html#aa3fa478af9db3e043a540fca72a2f468">More...</a><br /></td></tr>
<tr class="separator:aa3fa478af9db3e043a540fca72a2f468 inherit pub_attribs_structPxHitCallback"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e64f72a5edf7c442ce81e3e4a8c61d1 inherit pub_attribs_structPxHitCallback"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structPxHitCallback.html#a0e64f72a5edf7c442ce81e3e4a8c61d1">maxNbTouches</a></td></tr>
<tr class="memdesc:a0e64f72a5edf7c442ce81e3e4a8c61d1 inherit pub_attribs_structPxHitCallback"><td class="mdescLeft">&#160;</td><td class="mdescRight">Size of the user specified touching hits buffer.  <a href="structPxHitCallback.html#a0e64f72a5edf7c442ce81e3e4a8c61d1">More...</a><br /></td></tr>
<tr class="separator:a0e64f72a5edf7c442ce81e3e4a8c61d1 inherit pub_attribs_structPxHitCallback"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a549f6828e98c9aeaee9012defa100f74 inherit pub_attribs_structPxHitCallback"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structPxHitCallback.html#a549f6828e98c9aeaee9012defa100f74">nbTouches</a></td></tr>
<tr class="memdesc:a549f6828e98c9aeaee9012defa100f74 inherit pub_attribs_structPxHitCallback"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of touching hits returned by the query. Used with <a class="el" href="structPxHitBuffer.html" title="Returns scene query hits (intersections) to the user in a preallocated buffer. ">PxHitBuffer</a>.  <a href="structPxHitCallback.html#a549f6828e98c9aeaee9012defa100f74">More...</a><br /></td></tr>
<tr class="separator:a549f6828e98c9aeaee9012defa100f74 inherit pub_attribs_structPxHitCallback"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename HitType&gt;<br />
struct PxHitBuffer&lt; HitType &gt;</h3>

<p>Returns scene query hits (intersections) to the user in a preallocated buffer. </p>
<p>Will clip touch hits to maximum buffer capacity. When clipped, an arbitrary subset of touching hits will be discarded. Overflow does not trigger warnings or errors. block and hasBlock will be valid in finalizeQuery callback and after query completion. Touching hits are guaranteed to have closer or same distance ( &lt;= condition) as the globally nearest blocking hit at the time any <a class="el" href="structPxHitBuffer.html#af60ac2d3405c5af467f767f812f3f01d" title="virtual callback function used to communicate query results to the user. ">processTouches()</a> callback is issued.</p>
<dl class="section note"><dt>Note</dt><dd>Pre-made typedef shorthands, such as <a class="el" href="group__scenequery.html#gab21a68ce9e5a18aa742111920b75a84c" title="Raycast query buffer. ">PxRaycastBuffer</a> can be used for raycast, overlap and sweep queries.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="structPxHitCallback.html" title="This callback class facilitates reporting scene query hits (intersections) to the user...">PxHitCallback</a> </dd>
<dd>
<a class="el" href="group__scenequery.html#gab21a68ce9e5a18aa742111920b75a84c" title="Raycast query buffer. ">PxRaycastBuffer</a> <a class="el" href="group__scenequery.html#ga54a708942a891f3321c2427d5c160750" title="Overlap query buffer. ">PxOverlapBuffer</a> <a class="el" href="group__scenequery.html#gaecfed2b83a930b922b3d95e22ff30665" title="Sweep query buffer. ">PxSweepBuffer</a> <a class="el" href="structPxRaycastBufferN.html" title="Returns touching raycast hits to the user in a fixed size array embedded in the buffer class...">PxRaycastBufferN</a> <a class="el" href="structPxOverlapBufferN.html" title="Returns touching overlap hits to the user in a fixed size array embedded in the buffer class...">PxOverlapBufferN</a> <a class="el" href="structPxSweepBufferN.html" title="Returns touching sweep hits to the user in a fixed size array embedded in the buffer class...">PxSweepBufferN</a> </dd></dl>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a89bcec685c76c5cdc0662eb52b67d699"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a89bcec685c76c5cdc0662eb52b67d699">&#9670;&nbsp;</a></span>PxHitBuffer()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename HitType&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structPxHitBuffer.html">PxHitBuffer</a>&lt; HitType &gt;::<a class="el" href="structPxHitBuffer.html">PxHitBuffer</a> </td>
          <td>(</td>
          <td class="paramtype">HitType *&#160;</td>
          <td class="paramname"><em>aTouches</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a>&#160;</td>
          <td class="paramname"><em>aMaxNbTouches</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Initializes the buffer with user memory. </p>
<p>The buffer is initialized with 0 touch hits by default =&gt; query will only report a single closest blocking hit. Use <a class="el" href="structPxQueryFlag.html#a2124ff0cff0a021e01e6880a1bba431fa2837a6ac649b29ee72af661b65f4d8ab">PxQueryFlag::eANY_HIT</a> to tell the query to abort and return any first hit encoutered as blocking.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">aTouches</td><td>Optional buffer for recording <a class="el" href="structPxQueryHitType.html#acab1ef408184995d169330ed689b79e3aac7ebce08c20ff88ea4328035daa2498" title="a hit on the shape touches the intersection geometry of the query but does not block it ...">PxQueryHitType::eTOUCH</a> type hits. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">aMaxNbTouches</td><td>Size of touch buffer.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="structPxHitCallback.html" title="This callback class facilitates reporting scene query hits (intersections) to the user...">PxHitCallback</a> </dd></dl>

</div>
</div>
<a id="af3810ae6d94b93028e7a7d813f820cb4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af3810ae6d94b93028e7a7d813f820cb4">&#9670;&nbsp;</a></span>~PxHitBuffer()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename HitType&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="structPxHitBuffer.html">PxHitBuffer</a>&lt; HitType &gt;::~<a class="el" href="structPxHitBuffer.html">PxHitBuffer</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="aaab5f604de4a34ec0a9e3d6a86048833"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaab5f604de4a34ec0a9e3d6a86048833">&#9670;&nbsp;</a></span>getAnyHit()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename HitType&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__foundation.html#gacb03347b642a2a5bdea1f9b305a6fbec">PX_INLINE</a> const HitType&amp; <a class="el" href="structPxHitBuffer.html">PxHitBuffer</a>&lt; HitType &gt;::getAnyHit </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a>&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Convenience iterator used to access any hits in this result, blocking or touching. </p>

</div>
</div>
<a id="ad55cb7268df4d1c2a09d5daafb060daa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad55cb7268df4d1c2a09d5daafb060daa">&#9670;&nbsp;</a></span>getMaxNbTouches()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename HitType&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__foundation.html#gacb03347b642a2a5bdea1f9b305a6fbec">PX_INLINE</a> <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> <a class="el" href="structPxHitBuffer.html">PxHitBuffer</a>&lt; HitType &gt;::getMaxNbTouches </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a9ac7ea1c4411b8b88fa3099cb0df6cd1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9ac7ea1c4411b8b88fa3099cb0df6cd1">&#9670;&nbsp;</a></span>getNbAnyHits()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename HitType&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__foundation.html#gacb03347b642a2a5bdea1f9b305a6fbec">PX_INLINE</a> <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> <a class="el" href="structPxHitBuffer.html">PxHitBuffer</a>&lt; HitType &gt;::getNbAnyHits </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Computes the number of any hits in this result, blocking or touching. </p>

</div>
</div>
<a id="ac0d41dcf23ee0354d872d9d1348da971"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac0d41dcf23ee0354d872d9d1348da971">&#9670;&nbsp;</a></span>getNbTouches()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename HitType&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__foundation.html#gacb03347b642a2a5bdea1f9b305a6fbec">PX_INLINE</a> <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> <a class="el" href="structPxHitBuffer.html">PxHitBuffer</a>&lt; HitType &gt;::getNbTouches </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a1211b1a3c0bffae96842211901484d2d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1211b1a3c0bffae96842211901484d2d">&#9670;&nbsp;</a></span>getTouch()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename HitType&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__foundation.html#gacb03347b642a2a5bdea1f9b305a6fbec">PX_INLINE</a> const HitType&amp; <a class="el" href="structPxHitBuffer.html">PxHitBuffer</a>&lt; HitType &gt;::getTouch </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a>&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a9b764a84b8585b2a75ee37f210a2913b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9b764a84b8585b2a75ee37f210a2913b">&#9670;&nbsp;</a></span>getTouches()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename HitType&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__foundation.html#gacb03347b642a2a5bdea1f9b305a6fbec">PX_INLINE</a> const HitType* <a class="el" href="structPxHitBuffer.html">PxHitBuffer</a>&lt; HitType &gt;::getTouches </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="af60ac2d3405c5af467f767f812f3f01d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af60ac2d3405c5af467f767f812f3f01d">&#9670;&nbsp;</a></span>processTouches()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename HitType&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="group__scenequery.html#ga4d0184965c0a910f5c96cb69c0690f5c">PxAgain</a> <a class="el" href="structPxHitBuffer.html">PxHitBuffer</a>&lt; HitType &gt;::processTouches </td>
          <td>(</td>
          <td class="paramtype">const HitType *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a>&#160;</td>
          <td class="paramname"><em>nbHits</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>virtual callback function used to communicate query results to the user. </p>
<p>This callback will always be invoked with <a class="el" href="structPxHitCallback.html#aa3fa478af9db3e043a540fca72a2f468" title="User specified buffer for touching hits. ">touches</a> as a buffer if <a class="el" href="structPxHitCallback.html#aa3fa478af9db3e043a540fca72a2f468" title="User specified buffer for touching hits. ">touches</a> was specified as non-NULL. All reported touch hits are guaranteed to be closer than the closest blocking hit.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">buffer</td><td>Callback will report touch hits to the user in this buffer. This pointer will be the same as <a class="el" href="structPxHitCallback.html#aa3fa478af9db3e043a540fca72a2f468" title="User specified buffer for touching hits. ">touches</a>. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">nbHits</td><td>Number of touch hits reported in buffer. This number will not exceed <a class="el" href="structPxHitCallback.html#a0e64f72a5edf7c442ce81e3e4a8c61d1" title="Size of the user specified touching hits buffer. ">maxNbTouches</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>There is a significant performance penalty in case multiple touch callbacks are issued (up to 2x) </dd>
<dd>
to avoid the penalty use a bigger buffer so that all touching hits can be reported in a single buffer. </dd>
<dd>
If true (again) is returned from the callback, nbTouches will be reset to 0, </dd>
<dd>
If false is returned, nbTouched will remain unchanged. </dd>
<dd>
By the time processTouches is first called, the globally closest blocking hit is already determined, </dd>
<dd>
values of hasBlock and block are final and all touch hits are guaranteed to be closer than the blocking hit. </dd>
<dd>
touches and maxNbTouches can be modified inside of processTouches callback.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>true to continue receiving callbacks in case there are more hits or false to stop.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__scenequery.html#ga4d0184965c0a910f5c96cb69c0690f5c" title="Describes query behavior after returning a partial query result via a callback. ">PxAgain</a> <a class="el" href="structPxRaycastHit.html" title="Stores results of raycast queries. ">PxRaycastHit</a> <a class="el" href="structPxSweepHit.html" title="Stores results of sweep queries. ">PxSweepHit</a> <a class="el" href="structPxOverlapHit.html" title="Stores results of overlap queries. ">PxOverlapHit</a> </dd></dl>

<p>Implements <a class="el" href="structPxHitCallback.html#a9c6fc25eb66c22dad2a35d5630d4ec68">PxHitCallback&lt; HitType &gt;</a>.</p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="PxQueryReport_8h_source.html">PxQueryReport.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.14-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="structPxHitBuffer.html">PxHitBuffer</a></li>
    <li class="footer">Copyright &copy; 2008-2021 NVIDIA Corporation, 2788 San Tomas Expressway, Santa Clara, CA 95051 U.S.A. All rights reserved. <a href="http://www.nvidia.com ">www.nvidia.com</a></li>
  </ul>
</div>
</body>
</html>
